<template>
	<view>
		<view class="smart-comtainer">1,容器</view>
		<view class="smart-panel-title"@click="goDetailPage('view')"><text>view视图</text></view>
		<view class="smart-panel-h"@click="goDetailPage('scroll-view')"><text>scroll-view滚动视图</text></view>
		<view class="smart-panel-h"@click="goDetailPage('swiper')"><text>swiper可滑动视图</text></view>
		<view class="smart-comtainer">2,基础内容</view>
		<view class="smart-panel-title"@click="goDetailPage('text')"><text>text文本编辑</text></view>
		<view class="smart-panel-title"@click="goDetailPage('rich-text')"><text>rich-text富文本编辑</text></view>
		<view class="smart-panel-title"@click="goDetailPage('progress')"><text>progress进度条</text></view>
	    <view class="smart-comtainer" @click="goDetailPage('register')"><text>3,表单组件</text></view>
	    		<!-- 【添加这里】 -->
	    <view class="item-obj" @click="navito('button')"><text>button</text></view>
	    <view class="item-obj" @click="navito('radio')"><text>radio</text></view>
	    <view class="item-obj" @click="navito('checkbox')"><text>checkbox</text></view>
	    <view class="item-obj" @click="navito('input')"><text>input</text></view>
	    <view class="item-obj" @click="navito('picker')"><text>picker</text></view>
	    		
	    		<!-- 剩下的组件先放着，但不可点 -->
	    <!-- <view class="item-obj-disabled"><text>6.slider</text></view>
	    <view class="item-obj-disabled"><text>7.switch</text></view>
	    <view class="item-obj-disabled"><text>8.textarea</text></view>
	    <view class="item-obj-disabled"><text>9.form</text></view>
		<view class="item-obj"@click="navito('简单注册')"><text>10.简单注册</text></view> -->
		<!-- 4. 其他组件 -->
				<view class="class-title-item">
					<text class="item-title">
						4. 其他组件
					</text>
				</view>
				
				<!-- 【添加这里】 -->
				<view class="item-obj" @click="goDetailPage('navigator')">
					<text>1. navigator</text>
				</view>
				<view class="item-obj" @click="goDetailPage('image')">
					<text>2. image</text>
				</view>
				<view class="item-obj" @click="goDetailPage('video')">
					<text>3. video</text>
				</view>
				<view class="item-obj" @click="goDetailPage('map')">
					<text>4. map</text>
				</view>
	</view>
	<view class="component-container">
	    <!-- 原有菜单项 -->
	    <view url="/pages/component/map" class="menu-item" @click="goDetailPage('map')">
	      <text>地图</text>
	    </view>
	    
	    <!-- 新增"我的校园"菜单项 -->
	    <navigator url="/pages/homework/campus" class="menu-item"@click="goDetailPage('campus')">
	      <text>我的校园</text>
	    </navigator>
	    
	    <!-- 其他原有菜单项 -->
	  </view>
</template>

<script>
	export default {
		name:'component',
		data() {
			return {
				
			}
		},
		methods: {
			goDetailPage(e){
				if(typeof e === 'string'){
					uni.navigateTo({
						url:'/pages/component/' + e + '/' + e
					});
				}else{
					uri.navigateTo({
						url:e.url
					});
				}
			}
		}
	}
</script>

<style>
.item-obj-disabled {
	margin-bottom: 12px;
		background-color: #fdfdfd;
		padding: 10px;
		border-radius: 5px;
		color: #999;
		opacity: 0.6;
}
</style>
